//
//  ChatCell.m
//  JiaoX
//
//  Created by yinqy on 15/3/16.
//  Copyright (c) 2015年 北京娇羞科技有限公司. All rights reserved.
//

#import "ChatCell.h"


@implementation ChatCell

+ (instancetype)cellWithTableView:(UITableView *)tableView
{
    static NSString *ID = @"chatcell";
    ChatCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];
    if (!cell) {
        cell = [[ChatCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:ID];
    }
    return cell;
}

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        ChatCellView *chatCellView =  [[ChatCellView alloc]init];
        self.chatCellView = chatCellView;
        [self addSubview:chatCellView];
        
    }
    return self;
}

-(void)setCellViewFrame:(ChatCellViewFrame *)cellViewFrame{
    _cellViewFrame = cellViewFrame;
    [self.chatCellView setViewFrame:cellViewFrame];
}

@end
